import * as core from "./core"

const { ccclass, property } = cc._decorator;

@ccclass
export default class Main extends cc.Component {
    private static _instance: Main = null
    constructor() {
        super()
        Main._instance = this
    }
    public static get DebugMode(): boolean { return Main._instance.debugMode }

    @property
    debugMode: boolean = true

    onLoad() {
        cc.game.addPersistRootNode(this.node)
        core.SetDebug(this.debugMode)
    }

    start() {
    }

    update(dt: number) {
    }
}
